#ifndef __SYSTEM_CTL_H__
#define __SYSTEM_CTL_H__

#include "user_extern.h"

typedef struct _system
{
    int8_t initialization_flag; /* 初始化的标志 */
    int8_t windows_cur_id;      /* 当前的窗口 */
    int8_t windows_sub_id;      /* 当前子窗口 */
    uint16_t ui_frame_time;      /* 屏幕刷新时间 */

    /* 功能区 */
    int8_t     sys_wifi_enable;     /* 开启或关闭wifi */
    int8_t     sys_voice_ctrl;      /* 系统操作音 */
    int8_t     sys_sntp_en;         /* sntp 开关 */
    int8_t     sys_alarm_en;        /* 闹钟开关 */
    int8_t     sys_light_level;     /* 亮度等级 */

    uint8_t time_idle;   /* 暗屏 */
    uint8_t time_sleep;  /* 灭屏 */
    uint8_t ota_status;
} System_Api;

extern System_Api Dsystem;
extern struct tm g_time;
extern struct tm g_alarm;
void module_init(void);
void system_init(void);
void system_reinit(void);
void system_show_splash(void);

#endif